package com.heima.admin.controller.v1;

import com.heima.apis.wemedia.IWemediaClient;
import com.heima.model.article.dtos.UpOrDownDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: liudehuan
 * @description
 * @date: 2023-05-01 15:45
 */
@RestController
@RequestMapping("/api/v1/article")
public class ArticleController {

    @Autowired
    private IWemediaClient wemediaClient;

    @PostMapping("/up")
    public ResponseResult up(@RequestBody UpOrDownDto dto){
        return wemediaClient.up(dto);
    }

    @PostMapping("/down")
    public ResponseResult down(@RequestBody UpOrDownDto dto){
        return wemediaClient.down(dto);
    }
}
